package com.sinoeyes.controller.system;

import com.sinoeyes.common.core.controller.BaseController;
import com.sinoeyes.common.core.page.RestPageResult;
import com.sinoeyes.common.result.Result;
import com.sinoeyes.system.filter.SysLogininforFilter;
import com.sinoeyes.system.service.ISysLogininforService;
import com.sinoeyes.system.vo.SysLogininforVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统访问记录
 */
@RestController
@RequestMapping("/monitor/logininfor")
@Api(value = "系统访问记录 API", tags = {"系统访问记录"})
public class SysLogininforController extends BaseController
{
    @Autowired
    private ISysLogininforService logininforService;

    @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
    @GetMapping("/list")
    @ApiOperation("系统访问记录分页数据")
    public Result<RestPageResult<SysLogininforVo>> list(SysLogininforFilter logininforFilter)
    {
        RestPageResult<SysLogininforVo> pageResult = logininforService.selectLogininforList(logininforFilter);
        return Result.success(pageResult);
    }
}
